USE [PGI]
GO
/****** Object:  UserDefinedFunction [dbo].[FnDesencripta]    Script Date: 11/04/2013 23:40:06 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE FUNCTION [dbo].[FnDesencripta]
(
	@CLAVE VARCHAR(32), @semilla varchar(100)
)
	RETURNS NVARCHAR(32)
	AS
	BEGIN
		DECLARE @PASS AS NVARCHAR(32)
		SET @PASS =CONVERT(NVARCHAR(32),HashBytes('MD5',@CLAVE),2)
		RETURN @PASS
	END